package com.wshl.cloudservice.agora;

import java.util.Map;

import io.agora.rtm.LocalInvitation;
import io.agora.rtm.RemoteInvitation;
import io.agora.rtm.RtmMessage;

public interface IEventListener {
    void onJoinChannelSuccess(String channel, int uid, int elapsed);

    void onUserJoined(int uid, int elapsed);

    void onUserOffline(int uid, int reason);

    void onConnectionStateChanged(int status, int reason);

    void onPeersOnlineStatusChanged(Map<String, Integer> map);

    void onLocalInvitationReceived(LocalInvitation localInvitation);

    void onLocalInvitationAccepted(LocalInvitation localInvitation, String response);

    void onLocalInvitationRefused(LocalInvitation localInvitation, String response);

    void onLocalInvitationCanceled(LocalInvitation localInvitation);

    void onLocalInvitationFailure(LocalInvitation localInvitation, int errorCode);

    void onRemoteInvitationReceived(RemoteInvitation remoteInvitation);

    void onRemoteInvitationAccepted(RemoteInvitation remoteInvitation);

    void onRemoteInvitationRefused(RemoteInvitation remoteInvitation);

    void onRemoteInvitationCanceled(RemoteInvitation remoteInvitation);

    void onRemoteInvitationFailure(RemoteInvitation remoteInvitation, int errorCode);

    //获取到远端主播的第一帧画面
    void onRemoteDecoding(int uid, int state);

    //收到一条点对点消息
    void onMessAgeReceive(RtmMessage rtmMessage, String senduid);
}
